resolving almost all use cases. documentation to follow