add a few comments for explanation