how to write power method ....