added typechecking (and saving to env) of lambda images + test mods