adding insert function