worked out most of the dependencies.