moved example implementation from test/ to main/