Lings clock fixed main sketch