add 7 algorithm