error checking, added color for temrinal interface