refactored depedancy