add powerOfInteger() and fix assertions in power()