added controller, model logic; work needed on views