lots of fixes and added bitesharing