refactored to be initialized with request in constructor.