add method power_source to train.rb