finished image ording and voting functions, added testing code