fix; refactoring; comments