working on game finished function