created base model, view and model creation function, closed #2, closed #3