better input checking on std::cin