modify function name and algorithm