modified webui for display, reduce sqlite error by using db.serialize
instead of nesting callback