add loop
add total code block