new logic
bugfix