some sort of bad 12 problem solution
#12 more correct but not performance optimal solution