make a function with proper defaults