separable algorithm implemented