renderWith method