assignment4 revised