average function
rename fa to f'