wrote methods for toggle keys