adding constructor function