replaced TH-generated commands with hand-written