add class to style the open and closed states