adds close and open buttons