finished model and most of view, still some errors left to resolve