code of Ah~insight just for fun