clean up insert code
add fun for when list length > 3