fixed tests, started voting functions