making changes to function