main: added comment to cost function

Added a reasonable comment