vote tests passed
hopefully removed more duplicate code