added unsafe_extend