adding logger functionality