Added open/close functionality