Updated DSL to use 0-based indexing