finished algos
Profiling written