lab5: ex1-3 fix