working on finishing updated alg
: