added push_level_stack and pop_level_stack functions