Horrible clunky code that could be replaced

probably 1 line of code could do this smoother and nicer
I'll do it another day