made some changes, updated referrals to db mode
syntax fixed