Added method to calculate power