Gauss method logic separated.