quartz crystal working principle