move previous and next songs into single function