refactor psgi to new ->root method