Optimized logic for diamond