working on JS for dynamic win and lose modal