remove if for the sake of simpler upstream review (we do not need json/html logic yet)