refactor depency