use lambdas for object creation