changed some remote control things to dynamically calculate the max values