mechanism of crystal formation