Added code for remote control