2nd generation thesis code