adding two more algorithms