changed pop operation to constant time
fixed implementation of push, push now adds to the end of the list