added check_code trigger and other modifications