1D version added