Added time to setTimeout method