Main basado en API-NG sample code