modified voting logic in back-end and added basic front-end logic