changes how play/sleep works, to not have such a busy loop. (Sorry Min) also added the code to use with commandLinePerformer.java