script for problem2(b)
Merge http://github.com/yanshu/lab3