everything except the algorithm implemented