Jerry: add onloging fuction