updated playlist function