refactor to keep phpmd happy