Create algorithm