removed lambdas from render call to avoid memory consumption