implement time buffer