Code for 3rd year comsci.