clone from Roman Nurik's dashclock project