added stripspaces function