Add methods to index and controller