updated db model and script