finished version
add comments