adding source code for assign1