fixing tests and buffered writer
fixing parser