updated temporal and spatial expand functions