memory leaking is a discrace. ctype loops speedup achieved. still issues with memory.