fix addNewPermissionToProgram, make it global