envAlgRes works; new code for sanity check
added options for more rigorous testing