Working non-optimized logic