changed to index zero counting