first commit of assignment2

two function modified. comments added, a working example inserted