program objects simplified and code adjusted