update old code to newer code from mother project