var check and abort method refactoring