implemented gt_recv, fixed few miscellaneous issues