rebuckting code