add well commented singular code for ganesh class project