Added parameters and getNameByIndex method