correctd castling generation