fixed mpiscan deadlock
added hw4