done with sorting and merging, need to add signal handlers and parser