implements toCollection() in snapshot