adding lorenzo's changes.