added timeouts to function calls