add endsAt option, stop(), and infinite mode