Added bulk insert/update functionality