Messing with code from Violent Python