changed ansi code to be more universal