adding option for function in  of
added handling for creation of new rows, doc