refactoring button constructors