implemented cap for exterior complex scaling