updated algorithms
updated algorithms