refactor dependency