castling works needs a bit cleanup