Code from 3rd lab session.