refactor colorise method for clarity