refactor playlist api