added functionality to resolve by type