use isspace instead of isblank