fixing log problem, and little modification to the interface to allow