add train method