Added pop function