moved shit to above where it exits for noninteractive