added if statment
modified the view#show