still need to update UI, and implement win