implemented a simple logger