This should be a case-when statement probably...