added some structure and a interface example