non-perfect solution