Please put all of this into a relevant function!