instead of forming molecules, ionic compounds form