improved code for utility classes