add more if statement for data filtering by id in urlByName func