convert tooltip formatter into a function