resolve module dependencies

see issue #78