refactor lang history rebuild fns