index and deIndex compiles and runs