use dependency to remove redundancy