adding serial commands to code for remote control

...is the sheild im using with an adduino nano and xbees

With that device, and properly configured XBees, it is a direct replacement for a wire. You'd program the Arduinos just as if they had a wire connecting them.