Use obj.references() instead of collecting objects manually