refactored, added button