playlist engine reimplemented from scratch