completed implementation of getBalance, rotateLeft, and rotateRight, and remove methods