bug fixed
improved output