use re to remove whitespace
add repeated content check.