Working doubly linked list with push and pop functions