define function formatting