add jquery, refine logging