solution to mergeTwoLists