modified IJMemoryReader and Main