simplifying rule functions a bit for readability