adding in logging