refining code for child themes