improved code in utility classes