arrange mapping of pojo with termIds