log implementation working