flesh out insert function