initial version of the bn library and its test app