write constractor