switching from file manipulation to hashing