automatic end condition is added
added time measutements and comments