took out last part of logging