Revise DB W/R flow and random function.