add timeout in constructor