implemented std_rules (needs tweaking)