minor changes to script, win logic still broken