working on logging correctly.