delete local func.;adjust schema;minor edits