implemented sphere insertion