finished... checking code for bugs