old code from university