finally fixed the colour output