commented out some debugging things and changed range in loop.