indixing the function