finishing touches on create and query index