indent
logging
fix some bugs