adding test methods to the handle-tcp function
: