Homework for lab 4

I've looked at the example you posted for us and asked a collegue and i put this togheter.