Code from my DS class