Removing lcg rand from functions