add error messages
add comments