fixed up some errors
getting check_rules to handle conditions