modified to work with remote control