use std::ctype::is instead of isspace