For some reason I need to copy the case statement in here....