made exit status function handle multiple status codes