Code for my assignment in university