slimming up the code, about 10% of ram and program memory (before was 80%)