basic illustration of train api