updated algorithm description