add index to database