I have added closure inside the constructor and unsure of its performance as well as best practice. What is the best way to do that if it is not the right way to do it?