cleaning up/deconfusing the recv function