new function random_functional head added