modified controller & index