tweak
restore variables
add comments