implemented capturing for stubbing and verification