preliminary version of sleep demo