A combination of my CoderByte.com code