refactored hintmode