added remove_spaces function