Added class code from tuesday lecture