Please don't judge this code, extremely rushed