added fallback for testing in-place