cleaned it up a bit and fixed a bug where i used exit_status instead of status