Added the exit function