split the if check in show_selection into 2 if checks