Separated into child() and parent() functions