assign the id and log it after