Lab2 Implemented open_scope and close_scope