fix formatting
add test for function of function