Added gaussian algorithm