code adjusted