use isblank() instead of isspace() since the former does not care for \n