use function in behavior