added in function checkError, which checks the recieved packaged message, is able to determine whether there is error or not from brief testing