please split it out into a seperate function instead of having a parameter completely change what a function does