code optimized, method name modified