fixed some bugs, modified task 1 features, changed writer for new formatting