Added init values and write method.