revise assignment 3