added pointers and memory length