add old time lapse code.