works fine for 8 queens