added comments, set up listen connection with socket