modularized interpolation and movement prediction code