update the push and pop commands to use less lines