this is the worst code i've written in years, DON'T JUDGE ME