what is function constructor