refine code and begin to add winner functionality