added support for user data destroy functions