add callback for huxley modes; better error msgs