makes conditional ending string/int id agnostic