After refactored to not use a huge if then else