rename 'token' to 'function'