this wrap chunk could probably get pulled out to its own utility function now, seems needed in multiple commands.