updated solution to exercise 2 of lab01