remove spaces from names before searching for them