refactor when load remix