ansi color test
minor refactoring