cleaned up the code for the buttons, for iteration and Requirements