data pointer error handled, minor decorations