change algorithm