implemented client and server timeouts with tests