Refactored code to use the same dir