add color and fix some bugs