changed return values, added close(sckt)