implement P5push, P5pop and P5unshift