test function
changed AddCommand space check