Master thesis code