update to server side plus some changes in db model