added sleep stage
time fix