Refactor to use glob