added calclock and count