added comments for sanity check