Improvement of accuracy and changes for debugging purpose