optimisation, 'Function' struct, grade colors