Implement dependencies calculation