update nqueen problem using more simple method