added a rule and took out some unnecessarily roundabout code