added test if the command "end" is correctly recognized