add set time limit function