Implementing TODO 1 and 4- first pass