update the code the be cleaner and psr-2 valid