modified scripts to use only open and close