added ptr tests and new error codes