working button
functioning flipping buttonbetween states