refactored all warnings