Working with solenoids