more updates to the algo