add insertion algorithm