adds functioning insert method