task-7: some changes to avoid logging every time done