New version based on dcast