add function for comp imput string and mode names.