update to the algorithms