insert old data in the correct order