switched functions to occur on main button class