sending resource instead of nsdata