more changes to the afp script