code check Lindsey added root and help
added dictionary to shorten code.