some refactoring, add -to command in the valid parameters for modification