modified for upload files & for group id updates