added castle prototype