move fallback implementation to library