write special functions, modelling of data