add comments for error handles