added status byte checking