adding in log hook