change how subX and subY are calculated