add index backend logic