switch and quit functionality
not too sure..