Push and pop array working