changed memcpy main