refoctored log widget