save the x value into a file && add a module to update theta