Refactor to utils
refactor file