added support for free functions