some modification to ToneStack class