add phase_offset to account for wrong indices