minor changes
added insert function