implemented castle models