removed writing from addImpl when not necessary
added STMTreap
removed writing from removeImpl when not necessary