Use $with array for also setting references