updated version with playlist control