add support for custom types