Code for my bachelor thesis