add support and test for $unwind