removed unnessesary variables
bugfixing
finished indexGeneration