modify code to follow PSR-2