use of optima library for code simplification