added Sam's castle function