added option to stop simulator after time
changed examples to enable easier testing