Modify name of function. Add logging.