Moved expansion to action from output