added auto play functionality with options