added API to index