refactor, add params and request to template context