add sample code for interface and struct