inserting correct IDs