add train, addLayer method