Created firstLastIndex and tested

Ready for code review