new app-specific lib
updaterows function