add some comments
adjust code in overlay