insert function is done