a toy program solving bdb out of interest