updated for temporal queries