changes win alert and refactors comments