corrected color and optimisations