updated auto exit mechanism for no args