Added changeParent function to common_funcs