changed both pops to return pointer to node instead of struct node