simplify algo code by using CodingOptions class