fixed multiple outputs
add comments
add comments