use colordiff if available
made function variables local
removed --version (because the function doesn't exist!)