first version of mark-sweep gc