replace [[ ]] with [ ]