update code to psr-2 standard