prettified code and resolved pallete display issues