initial code for add, close bars