added overloaded local and global random with %