add comments and do comparison only if needed