array with power method exercise added