updated my lua code with my check_meta method