workaround for random