add support for negative array indices