3i solve, not really optimized