updated controller#index.js with changes from app#index