Following @matthewrobertson refactoring suggestion