Changed method name draw_header to write_header. Also draw_matched to write_matched