how are ionic and covalent bonds similar?