found a problem memcpy address of pointer instead of pointer