add test for lookup-indexed
add better error checking in lookup-indexed