working index controller