added working tests, paramaters, started working on index