retrieving compound ids