Add comments to dashboard helper function