changes to log in functions