refactored the logger and arguments