added a conditional to index.html.erb