code from Audio/Video System class | Parsons MFADT Spring 2012 | course conducted by Rui + Lucas