Finished function GetId