nighttime, outliers for daytime, more elegant code