refactoring to PSR-2 Coding Style Guide