A beam formulation with shell capabilities