added open and close classes to the buttons