adds validation of timeout