Re-add Kirill's cleverness with testing.