updated push and pull functions