working version with db models included - not using db really yet