implemented a basic logger