just need to write function to check for win