code improvements by PMD