Timeout functionality added