Code for bachelor thesis