code for child setting