minor corrections to make program compile