extract votes method to gem