create constructor of obj