fixed variable bug
optimized for psr-2