Added an insert method with tests