psr-1 // psr-2
enhance code and added some caching