3 rules that ionic compounds must follow