refactor given_castle