Added option for setting time limit