edit role function