CHART-API 004 final version with tests