add first implementation of h-dependency
add tests and fix h-dependency