refactoring codes that pick up readme.md file name