make a single function to generate jids
Add wheel function events, fix #7040