Professor version. Not debugged.