Improving (incomplete) solution, but it is not computing in 1 min or less, but it is better than the last one