Rev1 algorithm implemented