added a timeout of 2 seconds