added class for writing