added random coin generation