process timeouts refactor