add log and some comments