Added code to first two parts