edited stlwrite