using class instead httpservletrequest