getting castling working