added rough assign1 part b code