Code for my master's thesis