updated cleancigr to actually work. refactored into its own method and added unit test