move pop to regular code side