refactor buttons