added parser function for elections