bug fixes
updated db structure