Added power source method to train.rb