remove if statement for logging