error codes
updated function for new error codes
error code & concurrent measurement stuff