further changes to accommodate arp and correct errors with changes of passing pointers to functions