add support for optional dependencies