fix infinite loop bug in appears, add equiv to builtins, add support for else in cases