clean up generate command internally, using the regexp check for the user passed in attribute. update the unit tests as well.