detail mode done except for some memory leak problems