Added the working child function