first working version of bsoptim
Merge branch 'dev'