working push and pop