cosmetic and remove old permission code