some warnings refactored