Simplified demo3 by removing timer.