added a helper function for avatar and group code can now be reset or locked