This would be better in a helper.