split the example to interface and impl