Implementing dbn