prototype insert function and beter model stuff