buttons are active, abit of refactoring