now using postgres as db and started writing db access model methods