add BasicWriter class