updated 401 terminal script