optimised the colouring and rendering