refactored out dependencies