Added time index and time queries