implemented 2-state buttons