Extending addFunction