implemented the algoritms but they dont seem to work
implemented the algoritms and they work