implemented http status codes to check validity of sent packets