fixed an issue with random generator; changed the way the bag object was handled in playState