modified onclick for game