removed unnecessary selected_space = 's