adding switch statement for log level