added badFormat() function