changed gen file to testing temporarily and added a read file fn