add comments for base.c