renamed insert to push and added pop method