added more rules
added conditionals