time domain driving function updated for 3D case