fix index and test