Thank you for replying. Smart method! I've learned much;-) I'll have a try using UArray. Also, I guess my code still waste too much time "parsing" input (I compiled my code with -prof flag on)... Maybe ByteString may save me (or a smarter brain), What is your opinion about doing faster IO, would you please tell me?