replace the stupid logic...