update code to follow the psr-2 standard