added ballot functions (model, controller, view)