removed duplication in view_helpers