fixed test
fixed controller and index
minor fixes and test added