updated to take in multiple children