made creating the socket and reading happen in a async task