random module update, complex templatized