exit (and bye) implementation