getID functions without open and close