moved LUT to upper memory
reworked local program code