still coding check_rules()