commenting/cleaning
conditional formatting fix
Generalised conditional formatting function