fix memmory bug and change coloring