load algorithm