documented market_cap.php with comments