castle how it works