Adding precomputation of input signals and target function