added insert in the middle

indented code