finished SYN_SENT and refined code above that