atoindex completion
adds and finalizes atoindex function
Resolves atoindex conflict