changed function name to be more self explanatory
fixed socket creation in connect()
fixed error appending to list