This should be moved to a view helper module