added button state function & classes for buttons