added in logging and json now being digest