add index and migrate controllers