adjusting implementation of restructuring ast