Refactored using os.path.join