updated changes to file to make the code simpler