pow made easy with di
minor changes