created working saving and loading votes from db.