added in more logging