remove JBmisc dependency and replace JBmisc functions by new BBmisc stuff