teensy code revised