added code till part 2.1