Updates
FIxed a bug in algoB + Refactored