revise var names; correct check_consistency; add tests