modify put_id and hook funetion unittest