added another version hoping to gain some speed. didn't happen. actually had a crash when called from the main program.