check statuscode (closes #5)