lets you pass a logger object in to the constructor