getting ids at the wrong time
need to commit changes