SBOT Controller code