add castleApi stuff