update - random num generation not working