added timeout of hardcoded 5 seconds to sockets