added timeouts and errors