tidied more code for PSR