solve 'this' not captured in lambda problem