fixed wedge and insert

miller's code sucks