add clock code