modified insert to require 3 arguments or throw an error