added threading for playlist