moved utilities and hashmap below fs, fin, fout